#include<stdio.h>
void main()
{
	int flag=1;

	float mu=1;

	float sum=0;

	while(1/mu>=0.0001)
	{
		sum = sum + flag/mu;

		mu=mu+2;

		flag = -flag;
	}
	printf("pi=%f",sum*4);
}
